<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Fully-connected Layer Functions</title>
<title>CMSIS-NN: Fully-connected Layer Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<script type="text/javascript" src="cmsis_footer.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-NN
   &#160;<span id="projectnumber">Version 3.1.0</span>
   </div>
   <div id="projectbrief">CMSIS NN Software Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__FC.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Fully-connected Layer Functions<div class="ingroups"><a class="el" href="group__groupNN.html">Neural Network Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4a1521e7532a1e62d71f3b12762016e2"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga4a1521e7532a1e62d71f3b12762016e2">arm_fully_connected_mat_q7_vec_q15</a> (const q15_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:ga4a1521e7532a1e62d71f3b12762016e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixed Q15-Q7 fully-connected layer function.  <a href="#ga4a1521e7532a1e62d71f3b12762016e2">More...</a><br/></td></tr>
<tr class="separator:ga4a1521e7532a1e62d71f3b12762016e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3857bb6375692e81dde8cbd70adec08"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gae3857bb6375692e81dde8cbd70adec08">arm_fully_connected_mat_q7_vec_q15_opt</a> (const q15_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:gae3857bb6375692e81dde8cbd70adec08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixed Q15-Q7 opt fully-connected layer function.  <a href="#gae3857bb6375692e81dde8cbd70adec08">More...</a><br/></td></tr>
<tr class="separator:gae3857bb6375692e81dde8cbd70adec08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac666c212b209e636c2369dd5c75d0dc"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gaac666c212b209e636c2369dd5c75d0dc">arm_fully_connected_q15</a> (const q15_t *pV, const q15_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q15_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:gaac666c212b209e636c2369dd5c75d0dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 opt fully-connected layer function.  <a href="#gaac666c212b209e636c2369dd5c75d0dc">More...</a><br/></td></tr>
<tr class="separator:gaac666c212b209e636c2369dd5c75d0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga062912078da113f5dd2004fd919a0ff2"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga062912078da113f5dd2004fd919a0ff2">arm_fully_connected_q15_opt</a> (const q15_t *pV, const q15_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q15_t *bias, q15_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:ga062912078da113f5dd2004fd919a0ff2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 opt fully-connected layer function.  <a href="#ga062912078da113f5dd2004fd919a0ff2">More...</a><br/></td></tr>
<tr class="separator:ga062912078da113f5dd2004fd919a0ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga8b7e0c2e989e8c75f0dc789f3115323d">arm_fully_connected_q7</a> (const q7_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q7_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 basic fully-connected layer function.  <a href="#ga8b7e0c2e989e8c75f0dc789f3115323d">More...</a><br/></td></tr>
<tr class="separator:ga8b7e0c2e989e8c75f0dc789f3115323d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#gaf82b71ef472a38f8fc9ac414d9d07e67">arm_fully_connected_q7_opt</a> (const q7_t *pV, const q7_t *pM, const uint16_t dim_vec, const uint16_t num_of_rows, const uint16_t bias_shift, const uint16_t out_shift, const q7_t *bias, q7_t *pOut, q15_t *vec_buffer)</td></tr>
<tr class="memdesc:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 opt fully-connected layer function.  <a href="#gaf82b71ef472a38f8fc9ac414d9d07e67">More...</a><br/></td></tr>
<tr class="separator:gaf82b71ef472a38f8fc9ac414d9d07e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22aa22fe80e323429e8ac6aaeef878e8"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga22aa22fe80e323429e8ac6aaeef878e8">arm_fully_connected_s16</a> (const <a class="el" href="structcmsis__nn__context.html">cmsis_nn_context</a> *ctx, const <a class="el" href="structcmsis__nn__fc__params.html">cmsis_nn_fc_params</a> *fc_params, const <a class="el" href="structcmsis__nn__per__tensor__quant__params.html">cmsis_nn_per_tensor_quant_params</a> *quant_params, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *input_dims, const q15_t *input, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *filter_dims, const q7_t *kernel, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *bias_dims, const int64_t *bias, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *output_dims, q15_t *output)</td></tr>
<tr class="memdesc:ga22aa22fe80e323429e8ac6aaeef878e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic s16 Fully Connected function.  <a href="#ga22aa22fe80e323429e8ac6aaeef878e8">More...</a><br/></td></tr>
<tr class="separator:ga22aa22fe80e323429e8ac6aaeef878e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5f0e89482a3ea7ab417630be80ca983d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga5f0e89482a3ea7ab417630be80ca983d">arm_fully_connected_s16_get_buffer_size</a> (const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *filter_dims)</td></tr>
<tr class="memdesc:ga5f0e89482a3ea7ab417630be80ca983d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the required buffer size for S16 basic fully-connected and matrix multiplication layer function for TF Lite.  <a href="#ga5f0e89482a3ea7ab417630be80ca983d">More...</a><br/></td></tr>
<tr class="separator:ga5f0e89482a3ea7ab417630be80ca983d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30d44fed122f2e159a417f9c12181ded"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga30d44fed122f2e159a417f9c12181ded">arm_fully_connected_s8</a> (const <a class="el" href="structcmsis__nn__context.html">cmsis_nn_context</a> *ctx, const <a class="el" href="structcmsis__nn__fc__params.html">cmsis_nn_fc_params</a> *fc_params, const <a class="el" href="structcmsis__nn__per__tensor__quant__params.html">cmsis_nn_per_tensor_quant_params</a> *quant_params, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *input_dims, const q7_t *input, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *filter_dims, const q7_t *kernel, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *bias_dims, const int32_t *bias, const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *output_dims, q7_t *output)</td></tr>
<tr class="memdesc:ga30d44fed122f2e159a417f9c12181ded"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic s8 Fully Connected function.  <a href="#ga30d44fed122f2e159a417f9c12181ded">More...</a><br/></td></tr>
<tr class="separator:ga30d44fed122f2e159a417f9c12181ded"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88e541ff9fb088ebccb79a7a6b8bbe1e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__FC.html#ga88e541ff9fb088ebccb79a7a6b8bbe1e">arm_fully_connected_s8_get_buffer_size</a> (const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *filter_dims)</td></tr>
<tr class="memdesc:ga88e541ff9fb088ebccb79a7a6b8bbe1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the required buffer size for S8 basic fully-connected and matrix multiplication layer function for TF Lite.  <a href="#ga88e541ff9fb088ebccb79a7a6b8bbe1e">More...</a><br/></td></tr>
<tr class="separator:ga88e541ff9fb088ebccb79a7a6b8bbe1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Collection of fully-connected and matrix multiplication functions.</p>
<p>Fully-connected layer is basically a matrix-vector multiplication with bias. The matrix is the weights and the input/output vectors are the activation values. Supported {weight, activation} precisions include {8-bit, 8-bit}, {16-bit, 16-bit}, and {8-bit, 16-bit}.</p>
<p>Here we have two types of kernel functions. The basic function implements the function using regular GEMV approach. The opt functions operates with weights in interleaved formats. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga4a1521e7532a1e62d71f3b12762016e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_mat_q7_vec_q15 </td>
          <td>(</td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: 0</p>
<p>Q7_Q15 version of the fully connected layer</p>
<p>Weights are in q7_t and Activations are in q15_t </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="gae3857bb6375692e81dde8cbd70adec08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_mat_q7_vec_q15_opt </td>
          <td>(</td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: 0</p>
<p>Q7_Q15 version of the fully connected layer</p>
<p>Weights are in q7_t and Activations are in q15_t</p>
<p>Limitation: x4 version requires weight reordering to work</p>
<p>Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix looks like this:</p>
<p>| a11 | a12 | a13 | a14 | a15 | a16 | a17 |</p>
<p>| a21 | a22 | a23 | a24 | a25 | a26 | a27 |</p>
<p>| a31 | a32 | a33 | a34 | a35 | a36 | a37 |</p>
<p>| a41 | a42 | a43 | a44 | a45 | a46 | a47 |</p>
<p>| a51 | a52 | a53 | a54 | a55 | a56 | a57 |</p>
<p>| a61 | a62 | a63 | a64 | a65 | a66 | a67 |</p>
<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
<p>| a11 | a21 | a12 | a22 | a31 | a41 | a32 | a42 |</p>
<p>| a13 | a23 | a14 | a24 | a33 | a43 | a34 | a44 |</p>
<p>| a15 | a25 | a16 | a26 | a35 | a45 | a36 | a46 |</p>
<p>The column left over will be in-order. which is: | a17 | a27 | a37 | a47 |</p>
<p>For the left-over rows, we do 1x1 computation, so the data remains as its original order.</p>
<p>So the stored weight matrix looks like this:</p>
<p>| a11 | a21 | a12 | a22 | a31 | a41 |</p>
<p>| a32 | a42 | a13 | a23 | a14 | a24 |</p>
<p>| a33 | a43 | a34 | a44 | a15 | a25 |</p>
<p>| a16 | a26 | a35 | a45 | a36 | a46 |</p>
<p>| a17 | a27 | a37 | a47 | a51 | a52 |</p>
<p>| a53 | a54 | a55 | a56 | a57 | a61 |</p>
<p>| a62 | a63 | a64 | a65 | a66 | a67 | </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="gaac666c212b209e636c2369dd5c75d0dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_q15 </td>
          <td>(</td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Q15 basic fully-connected layer function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: 0 </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="ga062912078da113f5dd2004fd919a0ff2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_q15_opt </td>
          <td>(</td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: 0</p>
<p>Here we use only one pointer to read 4 rows in the weight matrix. So if the original matrix looks like this:</p>
<p>| a11 | a12 | a13 |</p>
<p>| a21 | a22 | a23 |</p>
<p>| a31 | a32 | a33 |</p>
<p>| a41 | a42 | a43 |</p>
<p>| a51 | a52 | a53 |</p>
<p>| a61 | a62 | a63 |</p>
<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
<p>| a11 | a12 | a21 | a22 | a31 | a32 | a41 | a42 |</p>
<p>| a13 | a23 | a33 | a43 |</p>
<p>Remaining rows are kept the same original order.</p>
<p>So the stored weight matrix looks like this:</p>
<p>| a11 | a12 | a21 | a22 | a31 | a32 | a41 | a42 |</p>
<p>| a13 | a23 | a33 | a43 | a51 | a52 | a53 | a61 |</p>
<p>| a62 | a63 | </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="ga8b7e0c2e989e8c75f0dc789f3115323d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_q7 </td>
          <td>(</td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: dim_vec</p>
<p>This basic function is designed to work with regular weight matrix without interleaving. </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, <a class="el" href="group__nndata__convert.html#gaba8fd446d5f54760b406ee63b25d1aee">arm_q7_to_q15_reordered_no_shift()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="gaf82b71ef472a38f8fc9ac414d9d07e67"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_q7_opt </td>
          <td>(</td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pV</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>pM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>dim_vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>num_of_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>bias_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>pOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>vec_buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pV</td><td>pointer to input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pM</td><td>pointer to matrix weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dim_vec</td><td>length of the vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_rows</td><td>number of rows in weight matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_shift</td><td>amount of left-shift for bias </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>pointer to bias </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pOut</td><td>pointer to output vector </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vec_buffer</td><td>pointer to buffer space for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<p><b>Buffer size:</b></p>
<p>vec_buffer size: dim_vec</p>
<p>This opt function is designed to work with interleaved weight matrix. The vector input is assumed in q7_t format, we call arm_q7_to_q15_no_shift_shuffle function to expand into q15_t format with certain weight re-ordering, refer to the function comments for more details. Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix looks like this:</p>
<p>| a11 | a12 | a13 | a14 | a15 | a16 | a17 |</p>
<p>| a21 | a22 | a23 | a24 | a25 | a26 | a27 |</p>
<p>| a31 | a32 | a33 | a34 | a35 | a36 | a37 |</p>
<p>| a41 | a42 | a43 | a44 | a45 | a46 | a47 |</p>
<p>| a51 | a52 | a53 | a54 | a55 | a56 | a57 |</p>
<p>| a61 | a62 | a63 | a64 | a65 | a66 | a67 |</p>
<p>We operates on multiple-of-4 rows, so the first four rows becomes</p>
<p>| a11 | a21 | a13 | a23 | a31 | a41 | a33 | a43 |</p>
<p>| a12 | a22 | a14 | a24 | a32 | a42 | a34 | a44 |</p>
<p>| a15 | a25 | a35 | a45 | a16 | a26 | a36 | a46 |</p>
<p>So within the kernel, we first read the re-ordered vector in as:</p>
<p>| b1 | b3 | and | b2 | b4 |</p>
<p>the four q31_t weights will look like</p>
<p>| a11 | a13 |, | a21 | a23 |, | a31 | a33 |, | a41 | a43 |</p>
<p>| a12 | a14 |, | a22 | a24 |, | a32 | a34 |, | a42 | a44 |</p>
<p>The column left over will be in-order. which is:</p>
<p>| a17 | a27 | a37 | a47 |</p>
<p>For the left-over rows, we do 1x1 computation, so the data remains as its original order.</p>
<p>So the stored weight matrix looks like this:</p>
<p>| a11 | a21 | a13 | a23 | a31 | a41 |</p>
<p>| a33 | a43 | a12 | a22 | a14 | a24 |</p>
<p>| a32 | a42 | a34 | a44 | a15 | a25 |</p>
<p>| a35 | a45 | a16 | a26 | a36 | a46 |</p>
<p>| a17 | a27 | a37 | a47 | a51 | a52 |</p>
<p>| a53 | a54 | a55 | a56 | a57 | a61 |</p>
<p>| a62 | a63 | a64 | a65 | a66 | a67 | </p>

<p>References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>, <a class="el" href="group__nndata__convert.html#gaba8fd446d5f54760b406ee63b25d1aee">arm_q7_to_q15_reordered_no_shift()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a class="anchor" id="ga22aa22fe80e323429e8ac6aaeef878e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_s16 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__context.html">cmsis_nn_context</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__fc__params.html">cmsis_nn_fc_params</a> *&#160;</td>
          <td class="paramname"><em>fc_params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__per__tensor__quant__params.html">cmsis_nn_per_tensor_quant_params</a> *&#160;</td>
          <td class="paramname"><em>quant_params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>input_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q15_t *&#160;</td>
          <td class="paramname"><em>input_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>filter_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>filter_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>bias_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int64_t *&#160;</td>
          <td class="paramname"><em>bias_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>output_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>output_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ctx</td><td>Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fc_params</td><td>Fully Connected layer parameters. fc_params-&gt;input_offset : 0 fc_params-&gt;filter_offset : 0 fc_params-&gt;output_offset : 0 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">quant_params</td><td>Per-tensor quantization info. It contains the multiplier and shift values to be applied to the output tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_dims</td><td>Input (activation) tensor dimensions. Format: [N, H, W, C_IN] Input dimension is taken as Nx(H * W * C_IN) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_data</td><td>Input (activation) data pointer. Data type: int16 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_dims</td><td>Two dimensional filter dimensions. Format: [N, C] N : accumulation depth and equals (H * W * C_IN) from input_dims C : output depth and equals C_OUT in output_dims H &amp; W : Not used </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_data</td><td>Filter data pointer. Data type: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_dims</td><td>Bias tensor dimensions. Format: [C_OUT] N, H, W : Not used </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_data</td><td>Bias data pointer. Data type: int64 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_dims</td><td>Output tensor dimensions. Format: [N, C_OUT] N : Batches C_OUT : Output depth H &amp; W : Not used. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">output_data</td><td>Output data pointer. Data type: int16 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<ul>
<li>Supported framework: TensorFlow Lite</li>
<li>q15 is used as data type eventhough it is s16 data. It is done so to be consistent with existing APIs. </li>
</ul>

<p>References <a class="el" href="structcmsis__nn__fc__params.html#ac4c27a0819335364ec291bac9043cd07">cmsis_nn_fc_params::activation</a>, <a class="el" href="group__NNBasicMath.html#ga721f565a0b8015a3d6d46535cadf63d3">arm_nn_vec_mat_mult_t_s16()</a>, <a class="el" href="structcmsis__nn__dims.html#ac9c268ab90554ab8ea2c3d76ecf1ed6c">cmsis_nn_dims::c</a>, <a class="el" href="structcmsis__nn__fc__params.html#a73c44b038fbb561281e27d58bb18b9a0">cmsis_nn_fc_params::filter_offset</a>, <a class="el" href="structcmsis__nn__activation.html#a5fefc67d8979f6a9efe36330b9ba81cf">cmsis_nn_activation::max</a>, <a class="el" href="structcmsis__nn__activation.html#a88a2ecd4bda8cd5f339c826df578585a">cmsis_nn_activation::min</a>, <a class="el" href="structcmsis__nn__per__tensor__quant__params.html#a4edb6cf363e3d30ad7e5166275629548">cmsis_nn_per_tensor_quant_params::multiplier</a>, <a class="el" href="structcmsis__nn__dims.html#a907a0be31e2e3de73df89b1327724555">cmsis_nn_dims::n</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#a19343832dbe881d527496171f69dc0c3">REDUCE_MULTIPLIER</a>, and <a class="el" href="structcmsis__nn__per__tensor__quant__params.html#a944f9c7b4f01355406b0a2ec9d578b87">cmsis_nn_per_tensor_quant_params::shift</a>.</p>

</div>
</div>
<a class="anchor" id="ga5f0e89482a3ea7ab417630be80ca983d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t arm_fully_connected_s16_get_buffer_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>filter_dims</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_dims</td><td>dimension of filter </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns required buffer size in bytes </dd></dl>

</div>
</div>
<a class="anchor" id="ga30d44fed122f2e159a417f9c12181ded"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_fully_connected_s8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__context.html">cmsis_nn_context</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__fc__params.html">cmsis_nn_fc_params</a> *&#160;</td>
          <td class="paramname"><em>fc_params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__per__tensor__quant__params.html">cmsis_nn_per_tensor_quant_params</a> *&#160;</td>
          <td class="paramname"><em>quant_params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>input_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>input_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>filter_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>filter_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>bias_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t *&#160;</td>
          <td class="paramname"><em>bias_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>output_dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>output_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ctx</td><td>Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fc_params</td><td>Fully Connected layer parameters. Range of fc_params-&gt;input_offset : [-127, 128] fc_params-&gt;filter_offset : 0 Range of fc_params-&gt;output_offset : [-128, 127] </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">quant_params</td><td>Per-tensor quantization info. It contains the multiplier and shift values to be applied to the output tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_dims</td><td>Input (activation) tensor dimensions. Format: [N, H, W, C_IN] Input dimension is taken as Nx(H * W * C_IN) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_data</td><td>Input (activation) data pointer. Data type: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_dims</td><td>Two dimensional filter dimensions. Format: [N, C] N : accumulation depth and equals (H * W * C_IN) from input_dims C : output depth and equals C_OUT in output_dims H &amp; W : Not used </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_data</td><td>Filter data pointer. Data type: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_dims</td><td>Bias tensor dimensions. Format: [C_OUT] N, H, W : Not used </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias_data</td><td>Bias data pointer. Data type: int32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_dims</td><td>Output tensor dimensions. Format: [N, C_OUT] N : Batches C_OUT : Output depth H &amp; W : Not used. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">output_data</td><td>Output data pointer. Data type: int8 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code></dd></dl>
<ul>
<li>Supported framework: TensorFlow Lite</li>
<li>q7 is used as data type eventhough it is s8 data. It is done so to be consistent with existing APIs. </li>
</ul>

<p>References <a class="el" href="structcmsis__nn__fc__params.html#ac4c27a0819335364ec291bac9043cd07">cmsis_nn_fc_params::activation</a>, <a class="el" href="group__NNBasicMath.html#ga140e5a1a4c146c8e90491792ed104d70">arm_nn_vec_mat_mult_t_s8()</a>, <a class="el" href="structcmsis__nn__dims.html#ac9c268ab90554ab8ea2c3d76ecf1ed6c">cmsis_nn_dims::c</a>, <a class="el" href="structcmsis__nn__fc__params.html#a73c44b038fbb561281e27d58bb18b9a0">cmsis_nn_fc_params::filter_offset</a>, <a class="el" href="structcmsis__nn__fc__params.html#a9d6902def53781c44a0a74dbc305629a">cmsis_nn_fc_params::input_offset</a>, <a class="el" href="structcmsis__nn__activation.html#a5fefc67d8979f6a9efe36330b9ba81cf">cmsis_nn_activation::max</a>, <a class="el" href="structcmsis__nn__activation.html#a88a2ecd4bda8cd5f339c826df578585a">cmsis_nn_activation::min</a>, <a class="el" href="structcmsis__nn__per__tensor__quant__params.html#a4edb6cf363e3d30ad7e5166275629548">cmsis_nn_per_tensor_quant_params::multiplier</a>, <a class="el" href="structcmsis__nn__dims.html#a907a0be31e2e3de73df89b1327724555">cmsis_nn_dims::n</a>, <a class="el" href="structcmsis__nn__fc__params.html#a9287b2e5770e0b6c72f88ebc3245f51a">cmsis_nn_fc_params::output_offset</a>, and <a class="el" href="structcmsis__nn__per__tensor__quant__params.html#a944f9c7b4f01355406b0a2ec9d578b87">cmsis_nn_per_tensor_quant_params::shift</a>.</p>

</div>
</div>
<a class="anchor" id="ga88e541ff9fb088ebccb79a7a6b8bbe1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t arm_fully_connected_s8_get_buffer_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcmsis__nn__dims.html">cmsis_nn_dims</a> *&#160;</td>
          <td class="paramname"><em>filter_dims</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filter_dims</td><td>dimension of filter </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns required buffer size in bytes </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">
      <script type="text/javascript">
        <!--
        writeFooter.call(this);
        //-->
      </script>    
    </li>
  </ul>
</div>
</body>
</html>
